import * as echarts from "echarts";
function binfn(item, data) {
    // var chartDom = document.getElementById('main');

    var myChart = echarts.init(item);
    if (myChart) {
        var option;
        option = {

            grid: {
                left: '0%',
                top: '5%',
                right: '1%',
                bottom: '1%',
                containLabel: false
            },
            series: [
                {
                    type: 'pie',
                    radius: ['0%', '75%'], // 使这个饼图稍微大一些，与第一个饼图分开显示
                    padAngle: 0,
                    itemStyle: {
                        normal: {
                            borderWidth:5,
                            borderColor:'#fff'
                        },
                    },
                    label: {
                        show: false,
                        position: 'center'
                    },
                    data: [
                        { value: 1048, selected: true },
                        { value: 735, selected: true },

                    ],
                    color:['#FF9028','#4E84F2'],
                }
            ]
        }
        option && myChart.setOption(option);
    } else {

    }
}

export { binfn }